#include "SnatchScene.h"

SnatchScene::SnatchScene(void)
	:mScrollView(NULL)
{
}

SnatchScene::~SnatchScene(void)
{
	CC_SAFE_RELEASE(mScrollView);
}

bool SnatchScene::init()
{
	return true;
}

SEL_MenuHandler SnatchScene::onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName )
{
	CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(this, "onDoItClick", SnatchScene::onDoItClick);
	return NULL;
}

SEL_CCControlHandler SnatchScene::onResolveCCBCCControlSelector( CCObject * pTarget, CCString * pSelectorName )
{
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onEnemyListBtnClick", SnatchScene::onEnemyListBtnClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onComposeBtnClick", SnatchScene::onComposeBtnClick);
	return NULL;
}

bool SnatchScene::onAssignCCBMemberVariable( CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode )
{
	CCB_MEMBERVARIABLEASSIGNER_GLUE(this, "mScrollView", CCScrollView *, this->mScrollView);
	return false;
}

void SnatchScene::onNodeLoaded( CCNode * pNode, CCNodeLoader * pNodeLoader )
{
	mScrollView = CCScrollView::create(CCSizeMake(270, 50));
	mScrollView->setDirection(CCScrollViewDirectionHorizontal);
	mScrollView->setPosition(ccp(25, 328));
	addChild(mScrollView);
}

void SnatchScene::onEnter()
{
	CCNode::onEnter();
}

void SnatchScene::onExit()
{
	CCNode::onExit();
}

void SnatchScene::refresh()
{

}

void SnatchScene::_onNotification( CCObject* object )
{
	
}

void SnatchScene::onDoItClick(CCObject* pSender)
{
    
}

void SnatchScene::onEnemyListBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{

}

void SnatchScene::onComposeBtnClick( CCObject * pSender, CCControlEvent pCCControlEvent )
{

}
